import { request } from "@/utils/service"

// 订单
/** 删 */
export function deleteOrdersApi(id: string) {
  return request({
    url: `orders/${id}`,
    method: "delete"
  })
}

/** 改 */
export function updateOrdersApi(data: any) {
  return request({
    url: "orders/" + data.id,
    method: "put",
    data
  })
}

/** 查 */
export function getOrdersApi(params: any) {
  return request<any>({
    url: "orders",
    method: "get",
    params
  })
}

/** 查详情 */
export function getOrdersChildrenDetailApi(id: string) {
  return request<any>({
    url: `orders/${id}`,
    method: "get"
  })
}
